Recursion and corecursion have the same equational logic
نویسنده
چکیده
This paper is concerned with the equational logic of corecursion, that is of definitions involving final coalgebra maps. The framework for our study is iteration theories (cf. e.g. Bloom and Ésik [?, ?]), recently re-introduced as models of the FLR0 fragment of the Formal Language of Recursion [?, ?, ?]. We present a new class of iteration theories derived from final coalgebras. This allows us to reason with a number of types of fixed-point equations which heretofore seemed to require to metric or order-theoretic ideas. All of the work can be done using finality properties and equational reasoning. Having a semantics, we obtain the following completeness result: the equations involving fixed-point terms which are valid for final coalgebra interpretations are exactly those valid in a number of contexts pertaining to recursion. For example, they coincide with the equations valid for least-fixed point recursion on dcpo’s. We also present a new version of the proof of the well-known completeness result for iteration theories (see Ésik [?] and Hurkens et al [?]). Our work brings out a connection between coalgebraic reasoning and recursion.
منابع مشابه
Exploiting Unique Fixed Points
Functional programmers happily use equational reasoning and induction to prove properties of recursive programs. To show properties of corecursive programs they employ coinduction, per perhaps less enthusiastically. Coinduction is often considered as a rather low-level proof method, especially, as it seems to depart rather radically from equational reasoning. In this talk we introduce an altern...
متن کامل(Co)recursion in Logic Programming: Lazy vs Eager
Coalgebraic Logic Programming (CoALP) is a dialect of Logic programming designed to work with coinductive definitions of infinite objects. Its main goal is to introduce guarded lazy corecursion akin functional theorem provers into logic programming. In this paper, we give the first full formal account of guarded corecursion in CoALP, and present its implementation.
متن کاملReasoning about Codata
Programmers happily use induction to prove properties of recursive programs. To show properties of corecursive programs they employ coinduction, but perhaps less enthusiastically. Coinduction is often considered a rather low-level proof method, in particular, as it departs quite radically from equational reasoning. Corecursive programs are conveniently defined using recursion equations. Suitabl...
متن کاملThe Optimal Fixed Point Combinator — Long Version
In this paper, we develop a general theory of fixed point combinators, in higher-order logic equipped with Hilbert’s epsilon operator. This combinator allows for a direct and effective formalization of corecursive values, recursive and corecursive functions, as well as functions mixing recursion and corecursion. It supports higherorder recursion, nested recursion, and offers a proper treatment ...
متن کاملBeating the Productivity Checker Using Embedded Languages
Some total languages, like Agda and Coq, allow the use of guarded corecursion to construct infinite values and proofs. Guarded corecursion is a form of recursion in which arbitrary recursive calls are allowed, as long as they are guarded by a coinductive constructor. Guardedness ensures that programs are productive, i.e. that every finite prefix of an infinite value can be computed in finite ti...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Theor. Comput. Sci.
دوره 294 شماره
صفحات -
تاریخ انتشار 1999